import Mock from "mockjs";
import homeApi from "./mockServeData/home";
import userApi from "./mockServeData/user";
import permission from "./mockServeData/permission";

// 定义mock请求拦截
Mock.mock("/api/home/getData", homeApi.getStatisticalData);

// 定义用户列表数据的接口
// 获取用户列表数据
Mock.mock(/\/api\/user\/getUser/, userApi.getUserList);
// 增加用户列表数据
Mock.mock("/api/user/add", "post", userApi.createUser);
// 删除用户列表数据
Mock.mock("/api/user/del", "post", userApi.deleteUser);
// 编辑用户列表数据
Mock.mock("/api/user/edit", "post", userApi.updateUser);
Mock.mock(/\/api\/permission\/getMenu/, "post", permission.getMenu);
